<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>shark::Timer Class Reference</title>
<script type="text/javaScript" src="search/search.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js"></script>
<script src="../../mlstyle.js"></script>
<link href="../css/besser.css" rel="stylesheet" type="text/css"/>
</head>
<!-- pretty cool: each body gets an id tag which is the basename of the web page  -->
<!--              and allows for page-specific CSS. this is client-side scripted, -->
<!--              so the id will not yet show up in the served source code -->
<script type="text/javascript">
    jQuery(document).ready(function () {
        var url = jQuery(location).attr('href');
        var pname = url.substr(url.lastIndexOf("/")+1, url.lastIndexOf(".")-url.lastIndexOf("/")-1);
        jQuery('#this_url').html('<strong>' + pname + '</strong>');
        jQuery('body').attr('id', pname);
    });
</script>
<body>
    <div id="shark_old">
        <div id="wrap">
            <div id="header">
                <div id="site-name"><a href="../../sphinx_pages/build/html/index.html">Shark machine learning library</a></div>
                <ul id="nav">
                    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/installation.html">Installation</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/tutorials/tutorials.html">Tutorials</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/benchmark.html">Benchmarks</a>
                    </li>
                    <li class="active">
                        <a href="classes.html">Documentation</a>
                        <ul>
                            <li class="first"></li>
                            <li><a href="../../sphinx_pages/build/html/rest_sources/quickref/quickref.html">Quick references</a></li>
                            <li><a href="classes.html">Class list</a></li>
                            <li class="last"><a href="group__shark__globals.html">Global functions</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<div id="doxywrapper">
<!--
    <div id="global_doxytitle">Doxygen<br>Documentation:</div>
-->
    <div id="navrow_wrapper">
<!-- Generated by Doxygen 1.9.8 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceshark.html">shark</a></li><li class="navelem"><a class="el" href="classshark_1_1_timer.html">Timer</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="classshark_1_1_timer-members.html">List of all members</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a>  </div>
  <div class="headertitle"><div class="title">shark::Timer Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="classshark_1_1_timer.html" title="Timer abstraction with microsecond resolution.">Timer</a> abstraction with microsecond resolution.  
 <a href="classshark_1_1_timer.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_timer_8h_source.html">shark/Core/Timer.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a58e306564b232e85ad13d49b59ce42c5" id="r_a58e306564b232e85ad13d49b59ce42c5"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_timer.html#a58e306564b232e85ad13d49b59ce42c5">Timer</a> (bool measureWallclockTime=true)</td></tr>
<tr class="separator:a58e306564b232e85ad13d49b59ce42c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d88aa872b2f0eb752c01c506cc24555" id="r_a4d88aa872b2f0eb752c01c506cc24555"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_timer.html#a4d88aa872b2f0eb752c01c506cc24555">start</a> ()</td></tr>
<tr class="memdesc:a4d88aa872b2f0eb752c01c506cc24555"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stores the current time in m_startTime.  <br /></td></tr>
<tr class="separator:a4d88aa872b2f0eb752c01c506cc24555"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3ccd47c0429d28d9600117b5ed57362" id="r_ad3ccd47c0429d28d9600117b5ed57362"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_timer.html#ad3ccd47c0429d28d9600117b5ed57362">stop</a> ()</td></tr>
<tr class="memdesc:ad3ccd47c0429d28d9600117b5ed57362"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the difference between current time and the start time.  <br /></td></tr>
<tr class="separator:ad3ccd47c0429d28d9600117b5ed57362"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a91e2a527ffbe3eabc7c8cf36ff742318" id="r_a91e2a527ffbe3eabc7c8cf36ff742318"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_timer.html#a91e2a527ffbe3eabc7c8cf36ff742318">lastLap</a> ()</td></tr>
<tr class="memdesc:a91e2a527ffbe3eabc7c8cf36ff742318"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the last value of <a class="el" href="classshark_1_1_timer.html#ad3ccd47c0429d28d9600117b5ed57362" title="Returns the difference between current time and the start time.">stop()</a>.  <br /></td></tr>
<tr class="separator:a91e2a527ffbe3eabc7c8cf36ff742318"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a4a3f88c6b69f2ed99176ee4c28057c6b" id="r_a4a3f88c6b69f2ed99176ee4c28057c6b"><td class="memItemLeft" align="right" valign="top">static double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_timer.html#a4a3f88c6b69f2ed99176ee4c28057c6b">now</a> (bool measureWallclockTime=true)</td></tr>
<tr class="memdesc:a4a3f88c6b69f2ed99176ee4c28057c6b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current time in a microsecond resolution. Att: may in rare cases give decreasing values.  <br /></td></tr>
<tr class="separator:a4a3f88c6b69f2ed99176ee4c28057c6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classshark_1_1_timer.html" title="Timer abstraction with microsecond resolution.">Timer</a> abstraction with microsecond resolution. </p>
<dl class="section user"><dt></dt><dd>Use <a class="el" href="classshark_1_1_timer.html#a4d88aa872b2f0eb752c01c506cc24555" title="Stores the current time in m_startTime.">start()</a> to start the timer and <a class="el" href="classshark_1_1_timer.html#ad3ccd47c0429d28d9600117b5ed57362" title="Returns the difference between current time and the start time.">stop()</a> to retrive the elapsed time in seconds (guaranteed/forced to be &gt;= 0 ). Use <a class="el" href="classshark_1_1_timer.html#a4a3f88c6b69f2ed99176ee4c28057c6b" title="Returns the current time in a microsecond resolution. Att: may in rare cases give decreasing values.">now()</a> to get the current time (may in rare cases give decreasing values). </dd></dl>

<p class="definition">Definition at line <a class="el" href="_timer_8h_source.html#l00056">56</a> of file <a class="el" href="_timer_8h_source.html">Timer.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a58e306564b232e85ad13d49b59ce42c5" name="a58e306564b232e85ad13d49b59ce42c5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a58e306564b232e85ad13d49b59ce42c5">&#9670;&#160;</a></span>Timer()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">shark::Timer::Timer </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>measureWallclockTime</em> = <code>true</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_timer_8h_source.html#l00059">59</a> of file <a class="el" href="_timer_8h_source.html">Timer.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_timer.html#a4d88aa872b2f0eb752c01c506cc24555">start()</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a91e2a527ffbe3eabc7c8cf36ff742318" name="a91e2a527ffbe3eabc7c8cf36ff742318"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a91e2a527ffbe3eabc7c8cf36ff742318">&#9670;&#160;</a></span>lastLap()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double shark::Timer::lastLap </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the last value of <a class="el" href="classshark_1_1_timer.html#ad3ccd47c0429d28d9600117b5ed57362" title="Returns the difference between current time and the start time.">stop()</a>. </p>

<p class="definition">Definition at line <a class="el" href="_timer_8h_source.html#l00119">119</a> of file <a class="el" href="_timer_8h_source.html">Timer.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_qp_box_linear.html#ab8274b4499b2b4c342735a3ab338e2fb">shark::QpBoxLinear&lt; InputT &gt;::solve()</a>, and <a class="el" href="classshark_1_1_qp_mc_linear.html#a468f877984aab4f95122083bf4a87152">shark::QpMcLinear&lt; InputT &gt;::solve()</a>.</p>

</div>
</div>
<a id="a4a3f88c6b69f2ed99176ee4c28057c6b" name="a4a3f88c6b69f2ed99176ee4c28057c6b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4a3f88c6b69f2ed99176ee4c28057c6b">&#9670;&#160;</a></span>now()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static double shark::Timer::now </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>measureWallclockTime</em> = <code>true</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the current time in a microsecond resolution. Att: may in rare cases give decreasing values. </p>

<p class="definition">Definition at line <a class="el" href="_timer_8h_source.html#l00066">66</a> of file <a class="el" href="_timer_8h_source.html">Timer.h</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_qp_solver.html#aef891551dc0bc92ab4571cb7d479706f">shark::QpSolver&lt; Problem, SelectionStrategy &gt;::solve()</a>, <a class="el" href="classshark_1_1_bias_solver.html#a94431a20658c032890cbb34fa0e0cba0">shark::BiasSolver&lt; Matrix &gt;::solve()</a>, <a class="el" href="classshark_1_1_bias_solver_simplex.html#a60479f4edcd9038d612da5c34d4e6022">shark::BiasSolverSimplex&lt; Matrix &gt;::solve()</a>, <a class="el" href="classshark_1_1_timer.html#a4d88aa872b2f0eb752c01c506cc24555">start()</a>, and <a class="el" href="classshark_1_1_timer.html#ad3ccd47c0429d28d9600117b5ed57362">stop()</a>.</p>

</div>
</div>
<a id="a4d88aa872b2f0eb752c01c506cc24555" name="a4d88aa872b2f0eb752c01c506cc24555"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4d88aa872b2f0eb752c01c506cc24555">&#9670;&#160;</a></span>start()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void shark::Timer::start </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Stores the current time in m_startTime. </p>

<p class="definition">Definition at line <a class="el" href="_timer_8h_source.html#l00097">97</a> of file <a class="el" href="_timer_8h_source.html">Timer.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_timer.html#a4a3f88c6b69f2ed99176ee4c28057c6b">now()</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_qp_mc_linear.html#a468f877984aab4f95122083bf4a87152">shark::QpMcLinear&lt; InputT &gt;::solve()</a>, and <a class="el" href="classshark_1_1_timer.html#a58e306564b232e85ad13d49b59ce42c5">Timer()</a>.</p>

</div>
</div>
<a id="ad3ccd47c0429d28d9600117b5ed57362" name="ad3ccd47c0429d28d9600117b5ed57362"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad3ccd47c0429d28d9600117b5ed57362">&#9670;&#160;</a></span>stop()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double shark::Timer::stop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the difference between current time and the start time. </p>
<p>The time is meeasured since the last time <a class="el" href="classshark_1_1_timer.html#a4d88aa872b2f0eb752c01c506cc24555" title="Stores the current time in m_startTime.">start()</a> was called. Thus several consecutive calls to <a class="el" href="classshark_1_1_timer.html#ad3ccd47c0429d28d9600117b5ed57362" title="Returns the difference between current time and the start time.">stop()</a> will return ascending numbers. <a class="el" href="classshark_1_1_timer.html#a4d88aa872b2f0eb752c01c506cc24555" title="Stores the current time in m_startTime.">start()</a> is called automatically at construction time. </p>

<p class="definition">Definition at line <a class="el" href="_timer_8h_source.html#l00105">105</a> of file <a class="el" href="_timer_8h_source.html">Timer.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_timer.html#a4a3f88c6b69f2ed99176ee4c28057c6b">now()</a>, and <a class="el" href="classshark_1_1_timer.html#ad3ccd47c0429d28d9600117b5ed57362">stop()</a>.</p>

<p class="reference">Referenced by <a class="el" href="gemm_8cpp.html#afef42b6a221387247b4aaa1a658a29ae">benchmark()</a>, <a class="el" href="syrk_8cpp.html#ab96e20f6ab413f64bb217d233bf34ae0">benchmark()</a>, <a class="el" href="conv2d_8cpp.html#aa29c4b1ecd308e3486ba80c16f257484">benchmark()</a>, <a class="el" href="potrf_8cpp.html#a86b76b5d9f7e943288e7395d313bfe5a">benchmark()</a>, <a class="el" href="hypervolume__algorithms_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main()</a>, <a class="el" href="logistic__regression___s_a_g_8cpp.html#af86d7c9886488dc99c56ffe6e320d549">run()</a>, <a class="el" href="classshark_1_1_qp_box_linear.html#ab8274b4499b2b4c342735a3ab338e2fb">shark::QpBoxLinear&lt; InputT &gt;::solve()</a>, <a class="el" href="classshark_1_1_qp_mc_linear.html#a468f877984aab4f95122083bf4a87152">shark::QpMcLinear&lt; InputT &gt;::solve()</a>, and <a class="el" href="classshark_1_1_timer.html#ad3ccd47c0429d28d9600117b5ed57362">stop()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/shark/Core/<a class="el" href="_timer_8h_source.html">Timer.h</a></li>
</ul>
</div><!-- contents -->
</div>
</body>
</html>
